<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<h3></h3>
		<script type="text/javascript">
		var days=["星期天","星期一","星期二","星期三","星期四","星期五","星期六"]
			function fun(){
				var date=new Date()
				var y=date.getFullYear()
				var M=date.getMonth()+1
				var d=date.getDate()
				var h=date.getHours()
				var m=date.getMinutes()
			    var s=date.getSeconds()
				M=format(M)
				d=format(d)
				h=format(h)
				m=format(m)
				s=format(s)
				var day=days[date.getDay()]
				var txt=`${y}-${M}-${d} ${h}:${m}:${s} ${day}`
				document.querySelector("h3").innerHTML=txt
			}
			function format(s){
				if(s<10){
					return "0"+s
				}
				return s
			}
			setInterval(fun,1000)
		</script>
	</body>
</html>
